<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
    <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="lg" %>
    <%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="lg2"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" href="${pageContext.request.contextPath}/static/css/font.css">
    <link rel="stylesheet" href="${pageContext.request.contextPath}/static/css/xadmin.css">
    <script type="text/javascript" src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
    <script type="text/javascript" src="${pageContext.request.contextPath}/static/lib/layui/layui.js" charset="utf-8"></script>
    <script type="text/javascript" src="${pageContext.request.contextPath}/static/js/xadmin.js"></script> 
    <script type="text/javascript" src="${pageContext.request.contextPath}/static/js/cookie.js"></script>
  </head>
  
  <body>
  
    <div class="x-nav">
      <a class="layui-btn layui-btn-small" style="line-height:1.6em;margin-top:3px;float:right" href="javascript:location.replace(location.href);" title="刷新">
        刷新</a>
    </div>
    <div class="x-body">
      <div class="layui-row">
        <form class="layui-form layui-col-md12 x-so">
        
          <input type="text" name="username"  placeholder="请输入用户名" autocomplete="off" class="layui-input">
          <button class="layui-btn"  lay-submit="" lay-filter="sreach"><i class="layui-icon">&#xe615;</i></button>
        </form>
      </div>
      <xblock>
        <button class="layui-btn layui-btn-danger" onclick="delAll()"><i class="layui-icon"></i>批量删除</button>
        <a href="${pageContext.request.contextPath}/users/manager-add.jsp">添加</a>
        <span class="x-right" style="line-height:40px">总共有${lg2:length(manager)}条数据 </span>  
      </xblock> 
      <table class="layui-table x-admin">
        <thead>
          <tr>
            <th>
              <div class="layui-unselect header layui-form-checkbox" lay-skin="primary"><i class="layui-icon">&#xe605;</i></div>
            </th>
            <th>用户名</th>
            <th>用户名</th>
            <th>手机</th>
            <th>操作</th></tr>
        </thead>
        <tbody>
        <lg:forEach items="${manager}" var="m">
			<tr>
			
			<td><div class="layui-unselect layui-form-checkbox" lay-skin="primary" data-id='${m.id}'><i class="layui-icon">&#xe605;</i></div></td>
				<td>${m.id}</td>
				<td>${m.name}</td>
				<td>${m.phone}</td>
				<td>
	              <a title="编辑"  onclick="x_admin_show('编辑','member-edit.html',600,400)" href="javascript:;">
	                <i class="layui-icon">&#xe642;</i>
	              </a>
	              <lg:if test="${sessionScope.manager.phone==m.phone}">
 		             <%--  <a  title="修改密码" href="${pageContext.request.contextPath}/users/manager-password.jsp">--%>
		                <a  title="修改密码" href="${pageContext.request.contextPath}/users/manager-password.jsp"  >
		                 <i class="layui-icon">&#xe631;</i>
		              </a> 
		              <%-- <a href="javascript:;" onclick="x_admin_show('修改计划','${pageContext.request.contextPath}/changePassword',500,250)" ><i class="layui-icon">&#xe642;</i>修改</a> --%>
	              </lg:if>
	              <lg:if test="${sessionScope.manager.phone!=m.phone}">
		              <a  title="删除" href="${pageContext.request.contextPath}/manager/delById?id=${m.id}">
		                <i class="layui-icon">&#xe640;</i>
	              </lg:if>
	              
	            </td>
	            
			</tr>
		</lg:forEach>
        </tbody>
      </table>
      <div class="page">
        <div>
          <a class="prev" href="">&lt;&lt;</a>
          <a class="num" href="">1</a>
          <span class="current">2</span>
          <a class="num" href="">3</a>
          <a class="num" href="">489</a>
          <a class="next" href="">&gt;&gt;</a>
        </div>
      </div>

    </div>
  </body>
</html>